<?php
/**
 * Created by dh2y.
 * Blog: http://blog.csdn.net/sinat_22878395
 * Date: 2020/1/31 14:21
 * For:
 */

namespace app\admin\validate;


use think\Validate;

class AuthGroup extends Validate
{
    protected $rule = [
        'title' => 'require|unique:auth_group',
        'des'  =>  'require',
        'state' => 'require|in:1,0',
        'rules' => 'require'
    ];



    protected $field = [
        'title'      => '角色名称',
        'des'      => '角色描述',
        'state'        => '审核状态',
    ];

    protected $message = [
        'rules.require' => '请给当前角色赋权'
    ];

    protected $scene = [
        'add' => ['title','state'],
        'edit' => ['title','state'],
        'access' => ['title','rules']
    ];
}